const { addCommentApi, doLogin, layout, signupApi } = require('../../controller/user')
const { isLogin } = require('../../middleware/user')

const router = require("koa-router")()

// 提交评论地址
router.post('/user/addComment/:itemId', isLogin(), addCommentApi)
// 登录
router.post('/signin', doLogin)
// 注册
router.post('/signup', signupApi)
// 注销
router.get("/layout", isLogin(), layout)

module.exports = router
